{% extends 'base.html' %}
{% block title %} Deliver  {% endblock %}
{% block script %}
	<style type="text/css">
		.alert {
    position: fixed;
    top: 0px;
}
	</style>
	<script type="text/javascript">
// 		$(document).ready(function(){
// 			var now =  new Date();
// 			setInterval(function(){
// 				$.ajax({
// 					url: '/api/store/task/notification/' + now.toISOString() + '/',
// 					method: 'GET',
// 					success: function(data){
// 						console.log(data.notification);
// 						if(data['notification'] === 0){
// 							$('.badge').text('');
// 						}else{
// 							$('.badge').text(data['notification']);
// 						}
// 					}

// 				})
// 				$().alert();

// setTimeout(function(){$('.alert').alert('close')}, 3000);
// 			}, 1000)

// 		})
	</script>
{% endblock %}
{% block sidebar %}
	{% url 'deliver_tasks' as deliver_tasks_url %}
	{% url 'delivery_boy_account' as delivery_boy_url %}

	<div class="text-center">
		<h4>Welcome, {{request.user.delivery_boy}}</h4>
		<div class=".badge"></div>
		<h4>{{reqest.user.get_full_name }}</h4>
	</div>
	<div class="list-group">
			<span class="text-uppercase"></span>
			<a href="{% url 'deliver_tasks' %}" class="list-group-item {% if request.path == deliver_tasks_url %} active {% endif %} ">Tasks<span class="badge"></span></a>
			<span class="text-uppercase"></span>
		      <a href="{% url 'delivery_boy_account' %}"
		          class="list-group-item {% if request.path == delivery_boy_url %} active {% endif %} ">Account</a>
	</div>
	 <div class="text-center">
      <a href="{% url 'delivery_boy-signout' %}?next=/store/signin/"
          class="btn btn-pink">Logout</a>
    </div>
   {% endblock %}